<?php

namespace common\models\business;

use Yii;

/**
 * This is the model class for table "business_pig_price_unit".
 *
 * @property string $id
 * @property string $name
 */
class BusinessPigPriceUnit extends \yii\db\ActiveRecord
{




    //主要用于日志记录
    public $uselog = [
        'tabcomment' => '销售单位维护',      //用于修改了什么的显示
        'mainfield' => 'name',      //主要的显示标题的字段
        'picturefield' => [],        //图片字段
        'timefield' => [],       //时间字段
        'unsetfiled' =>[],      //不需要记录的字段
    ];


    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'business_pig_price_unit';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['name'], 'string', 'max' => 10],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '单位名称',
        ];
    }
}
